from typing import TYPE_CHECKING

from sqlalchemy import Boolean, Column, Integer, String, text, TIMESTAMP, Text, BigInteger
from sqlalchemy.orm import relationship

from app.db.base_class import Base


class BlockInstrument(Base):
    __tablename__ = 'tb_block_instrument'

    id = Column(BigInteger, primary_key=True)
    blockId = Column('block_id', Integer)
    instrumentId = Column('instrument_id', Integer)
    createdDate = Column('created_date', TIMESTAMP, server_default=text('CURRENT_TIMESTAMP'))
    updatedDate = Column('updated_date', TIMESTAMP, server_default=text('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))

